<!DOCTYPE html>
{% load static %}
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>问题</title>
    <link rel="stylesheet" href="{% static 'css/Bootstrap.css' %}" type="text/css">
    <script src="{% static 'js/jquery.js' %}"></script>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="{% static 'js/bootstrap.min.js' %}"></script>
    <script src="{% static 'js/jquery.js' %}"></script>
    <style>
        a[id="{{ n }}"]{
             background-color:#0C4FB6;
             color:white;
             padding:0px 10px 0px 0px;
        }
        *{
            padding: 0px;
            margin: 0px;
        }
        body{
        position:relative;
            width:100%;
            min-width:1250px;
        }
        .reload{
            font-family: 楷体;
            position: relative;
            padding: 5px 8px;
            background-color: #0C4FB6;
            color:white;
            border-radius: 8px;
            margin: 0px 0px 0px 20px;
        }
    </style>
</head>
<body background="/static/images/videobeij.gif">
<nav class="navbar navbar-default" style="font-size: 20px">
    <div class="container-fluid">
        <div class="navbar-header">
            <a class="navbar-brand" href="/resource/index/0/1">广西大学网络中心9楼知识库</a>
        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li><a href="/resource/upload_wz">添加记录</a></li>
            </ul>
            <form action="/resource/search" class="navbar-form navbar-left">
                <div class="form-group">
                    <input type="text" class="form-control" name="info" placeholder="Search">
                </div>
                <button type="submit" class="btn btn-default">查找</button>
            </form>
            <ul class="nav navbar-nav navbar-right">
                <li><a href="/about">关于我们</a></li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                       aria-expanded="false">用户中心<span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        {% if not x %}
                        <li><a href="/login" style="color: black">登录</a></li>
                        <li><a href="/register" style="color: black">注册</a></li>
                        {% else %}
                        <li><a href="/resource/upload_wz" style="color: black">添加记录</a></li>
                        <li><a href="/login/logouting_" style="color: black">注销</a></li>
                        {% endif %}
                        <li role="separator" class="divider"></li>
                        <li><a href="/admin" style="color: black">后台管理</a></li>
                    </ul>
                </li>
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>
<ul class="nav nav-pills" style="position:relative;left:10%;width:90%">
    {% if n == 999 %}
    <li role="presentation"><a id="999" href="/resource/index/0/1">搜索结果</a></li>
    {% else %}
    <li role="presentation"><a id="0" href="/resource/index/0/1">全部</a></li>
    {% for type in type_list %}
    <li role="presentation"><a id="{{ type.id }}" href="/resource/index/{{ type.id }}/1">{{ type.type }}</a></li>
    {% endfor %}
    {% endif %}
</ul>
<div class="container page-header" style="margin: 0px 0px 10px 0px;position:relative;left:10%">
    <h1>广西大学网络中心9楼知识库
        <small>——9楼摸鱼</small>
    </h1>
    <br>
</div>
<div style="position:absolute;margin-left:13%;width:55%">
    <div class="body-main">
        {% for article in article_list %}
        <div>
            <h3><a href="/resource/article/{{ article.article_id }}/{{ n }}">{{article.title}}</a><a class="reload" href="/resource/reload_wz/{{article.article_id}}">修改</a></h3>
            <p><h4 style="color:red">发布人：
            {{ article.author }}
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            {{ article.publish_date }}
        </h4>
            </p>
        </div>
        {% endfor %}
    </div>
    <div align="center">
        <nav aria-label="Page navigation">
            <ul class="pagination">
                {% if previous_page == 0 %}
                <li class="disabled"><a aria-label="Previous" href="#"><span aria-hidden="true">&laquo;</span></a></li>
                {% else %}
                <li><a aria-label="Previous" href="/resource/index/{{n}}/{{ previous_page }}"><span
                        aria-hidden="true">&laquo;</span></a></li>
                {% endif %}
                {% for num in page_num %}
                {% if num == curr_page %}
                <li class="active"><a href="/resource/index/{{n}}/{{ num }}">{{ num }}</a></li>
                {% else %}
                <li><a href="/resource/index/{{n}}/{{ num }}">{{ num }}</a></li>
                {% endif %}
                {% endfor %}
                {% if next_page == 0 %}
                <li class="disabled"><a aria-label="Next" href="#"><span aria-hidden="true">&raquo;</span></a></li>
                {% else %}
                <li><a aria-label="Next" href="/resource/index/{{n}}/{{ next_page }}"><span aria-hidden="true">&raquo;</span></a>
                </li>
                {% endif %}
            </ul>
        </nav>
    </div>
</div>
<div style="margin-left:75%;width:200px">
    <div>
        <h3>本页导航</h3>
        {% for article in article_list %}
        <h4><a href="/resource/article/{{ article.article_id }}/{{n}}">{{article.title}}</a></h4>
        {% endfor %}
    </div>
</div>
</body>
</html>